<%@ page session="true"%>
<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${sessionScope.APP_NAME}</title>
<link type="text/css" rel="stylesheet"
	href="<c:url value="/resources/css/login.css" />" />
<script type="text/javascript"
	src="<c:url value="/resources/js/common/jquery-1.8.0.js" />"></script>
<!-- -->
<script type="text/javascript"
	src="<c:url value="/resources/js/common/cloud.js" />"></script>
<script type="text/javascript"
	src="<c:url value="/resources/js/common/login.js" />"></script>

<script language="javascript">
	$(function() {
		$('.loginbox').css({
			'position' : 'absolute',
			'left' : ($(window).width() - 692) / 2
		});
		$(window).resize(function() {
			$('.loginbox').css({
				'position' : 'absolute',
				'left' : ($(window).width() - 692) / 2
			});
		});
		if ($('#msg').text()) {
			alert($('#msg').html());
			location.go(-1);
		}
	});
</script>

</head>
<body style="background-color: #1c77ac; background-image: url(<c:url value="/resources/img/light.png"/>); background-repeat: no-repeat; background-position: center top; overflow: hidden;">



	<div id="mainBody">
		<div id="cloud1" class="cloud"></div>
		<div id="cloud2" class="cloud"></div>
	</div>


	<div class="logintop">
		<span></span>
		<ul>
			<li><a href="#"></a></li>
			<li><a href="#"></a></li>
			<li><a href="${ctx}/chrome_installer.exe">下载浏览器</a></li>
		</ul>
	</div>

	<div class="loginbody">

		<span class="systemlogo"></span>

		<div class="loginbox">
			<form id="loginForm" url="<c:url value="/user/login" />">
				<ul>
					<li><input name="username" type="text" class="loginuser" /></li>
					<li><input name="password" type="password"  class="loginpwd"/></li>
					<li><input type="button" class="loginbtn" value="登录" /><label><input
							name="remeber" type="checkbox" value="true" checked="checked" />记住密码</label><label><a
							href="#">忘记密码？</a></label></li>
				</ul>
			</form>

		</div>

	</div>



	<div class="loginbm">
		版权所有 2015 -2016 <a href="#">${sessionScope.APP_TECH}</a>
	</div>

</body>
<script type="text/javascript">
	$(function() {
		document.onkeydown = function(e) {
			var ev = document.all ? window.event : e;
			if (ev.keyCode == 13) {
				var url = $('#loginForm').attr('url');
				$.post(url, $("#loginForm").serialize(), function(data) {
					if (data.result == 0) {
						location.href = data.message;
					} else {
						alert(data.message);
					}
				});
			}
		}
	});
</script>

</html>